System, method, computer program and data signal for scheduling at least one physical event

ABSTRACT

A system and method for scheduling at least one event includes a component module arranged to receive component data regarding a plurality of possible operation decisions, a modelling module arranged to utilise the plurality of operation decisions to construct a Petri net model to simulate a real world system, a scheduling module arranged to utilise the Petri net and variable data regarding the plurality of operation decisions to determine a schedule of events that is feasible subject to a set of predetermined constraints, and an operation module arranged to provide the schedule of events to at least one external device.

TECHNICAL FIELD

The present invention relates generally to a system, method, computer program and data signal for scheduling at least one physical event.

Embodiments of the invention find particular, but not exclusive, use in the area of scheduling the transport of crude oil in a manner which optimises tank usage (i.e. which provides “least tank requirement”).

The present invention also has application in the area of space optimisation generally.

BACKGROUND

Oil continues to be a central and crucial energy resource for the world and oil refineries continue to play a crucial role in society. It is known that a well operated plant can increase the profit by $10 for every ton of products produced.

A plant is operated hierarchically with three levels: production planning at the higher level, production scheduling at the middle level, and process control at the lower level. For production planning at the higher level, an optimal plan can be pursued for the whole refinery by using commercial software tools that are developed based on linear programming techniques. For process control at the lower level, the implementation of advanced control systems for unit control results in a productivity increase for devices. However, the productivity optimization of production units does not imply global profit optimization of the plant.

To optimize a plant correctly, effective techniques for short-term scheduling at the middle level are necessary such that the three levels of operation can be integrated.

The short-term scheduling problem is one of the most difficult ones for operating an oil refinery and, up to now, no effective technique and/or software has been developed. This job is currently performed manually in a trial and error way.

While some attempts have been made to make the short-term scheduling problem of oil refineries solvable, such models have often disregarded physical and “real world” constraints, which leads to the creation of an infeasible schedule.

Real world constraints may include (for example) the number of charging tanks in the oil refinery system. Most conventional setups require three charging tanks for each distiller. However, in some real world oil refineries, the number of available charging tanks for a scheduling horizon may be less than the number required by the conditions. For instance, one oil refinery in China installed an additional distiller to extend their production capacity but did not change the number of charging tanks, leading to a situation where the charging tanks became the bottleneck for the system. Such real world constraints make the development of a workable (and flexible) model more difficult.

It is with this background in mind that the embodiments of the invention and the broader inventive concept have been developed.

SUMMARY OF THE INVENTION

In a first aspect, the present invention provides a system for scheduling at least one event, comprising a component module arranged to receive component data regarding a plurality of possible operation decisions, a modelling module arranged to utilise the plurality of operation decisions to construct a petri net model to simulate a real world system, and a scheduling module arranged to utilise the Petri net and variable data regarding the plurality of operation decisions to determine a schedule of events that is feasible subject to a set of predetermined constraints, and an operation module arranged to provide the schedule of events to at least one external device.

Preferably, the schedule of events is optimised via use of an optimisation algorithm.

In one embodiment, the operation decisions include a subset of variables which describe physical components and/or physical characteristics of a real world system.

Preferably, the operation decisions are directed to the operation of an oil refinery.

In one embodiment, the physical characteristics of the real world system include the oil type, the device from which oil is received, the device where oil goes and the amount of oil to be processed.

In one embodiment, the physical components include a storage tank, a pipeline, a charging tank and a distiller.

The optimisation algorithm may comprise modelling discrete physical components by providing constraints that determine how each discrete physical component operates.

In one embodiment, the optimisation algorithm comprises modelling discrete physical characteristics by providing constraints that determine how each discrete physical component operates.

The Petri net may be a hybrid discrete-continuous Petri net.

In a second aspect, the present invention provides a method for scheduling at least one event, comprising the steps of receiving component data regarding a plurality of possible operation decisions, utilising the plurality of operation decisions to construct a Petri net model to simulate a real world system, and utilising the Petri net and variable data regarding the plurality of operation decisions to determine a schedule of events that is feasible subject to a set of predetermined constraints.

In a third aspect, the present invention provides a computer program incorporating at least one instruction, arranged to, when executed on a computing system, perform the method steps in accordance with the second aspect of the invention.

In a fourth aspect, the present invention provides a data signal encoding at least one instruction, arranged to, when received and executed on a computing system, perform the method steps in accordance with the second aspect of the invention.

In a fifth aspect, the present invention provides an oil refinery incorporating a system in accordance with the first aspect of the invention, wherein the at least one device includes a physical component which operates at least one aspect of the oil refinery.

BRIEF DESCRIPTION OF DRAWINGS

The invention is now discussed with reference to drawings, where:

FIG. 1 is a schematic diagram illustrating a system in accordance with an embodiment of the present invention;

FIG. 2 is a diagram illustrating a series of icons utilised in subsequent Figures to model a Petri Net in accordance with an embodiment of the invention;

FIG. 3 is a diagram illustrating a model of a Petri net model for a tank in an oil refinery;

FIG. 4 is a diagram illustrating a model of a Petri net model for a pipeline in an oil refinery;

FIG. 5 is a diagram illustrating a model of a Petri net model for an oil refinery;

FIG. 6 is a diagram illustrating a model of a Petri net model for a tank in an oil refinery including four charging tanks and two distillers;

FIG. 7 is a diagram illustrating a model of a Petri net model for a tank in an oil refinery with more than two distillers;

FIG. 8 is a diagram illustrating a refining schedule in accordance with an embodiment of the invention;

FIG. 9 is a diagram illustrating a detailed distiller feeding schedule in accordance with an embodiment of the invention; and

FIG. 10 is a diagram illustrating a detailed schedule for delivering oil to charging tanks in accordance with an embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates generally to a system, method, computer program and data signal for the scheduling of an event and/or action or scheduling a series of events and/or actions. The embodiments described herein are described with reference to the scheduling of the transport of crude oil. However, it will be appreciated that the system, method computer program and data signal has application in other analogous areas.

It is instructive to understand how oil refineries typically operate, as this has an effect on the types of restraints that need to be built into any scheduling system. It will be understood that the forgoing description is provided as an example of the types of constraints that typically affect an oil refinery. However, no gloss should be taken from the examples provided herein to limit or otherwise read down the broader inventive concept. These constraints are provided for illustrative purposes only.

In a typical oil refinery, there are storage tanks for crude oil storage and also charging tanks for distiller feeding. Often storage tanks are located by the sea (to allow tankers to be easily filled) with a distance of tens of kilometers from the finery plant. Generally, a pipeline is used to transport crude oil from the storage tanks to the charging tanks. Crude oil purchased from oil fields arrives by sea via crude oil tankers and is unloaded into storage tanks. Via the pipeline, the oil in the storage tanks is delivered into charging tanks and is then fed into distillers. The process from unloading oil from tankers to feeding oil to distillers forms crude oil operations.

A refinery purchases crude oil from a number of oil fields. The oil received from each oil field is different and therefore the crude distillation process will vary for each “batch” of oil. As such, oil from different fields is not mixed in the same tank. That is, a tank does not typically hold more than one type of oil at any given time. Thus, in the process of a tanker unloading, oil is always placed into an empty storage tank or a tank with the same type of oil in it.

The same constraints occur when oil is delivered into a charging tank from a storage tank via a pipeline. Although a pipeline can be in an idle state for some time, it is generally full of oil. In delivering oil from storage tanks to charging tanks, the pipeline needs to switch from one type of oil to another. Hence, in a pipeline, there may be several segments which each contain a different oil type. Note that different oil types can be mixed when oil is delivered from storage tanks to charging tanks. However, a mixture of different types of oil can be treated as another type of oil.

In the ensuing description, a number of constraints are assumed for all crude oil operations and these constraints inform the algorithms embedded in the software and hardware in accordance with an embodiment of the invention:

1. The oil types and their amounts usable during a scheduling horizon are those initially available in the tanks and pipelines, and those that arrive via tankers during the scheduling horizon;

2. Only the available storage and charging tanks can be used and the capacity of each tank is limited;

3. The flow rates for oil transportation via a pipeline and oil feeding for a distiller should be in an allowable range;

4. It is not allowable to charge and discharge a tank at the same time;

5. The operation of a distiller should not be interrupted at any time during the scheduling horizon except a planned maintenance; and

6. After filling a tank, there is an oil residency time constraint that requires that the oil should stay there for a given time before it can be discharged.

Based on the above constraints (1 through 6) an algorithm and model, which is encoded in software, has been developed which addresses these constraints and provides a workable ‘real world’ scheduling system which can be used to control an automated or semi-automated scheduling system to operate an oil refinery.

In FIG. 1 there is shown a schematic diagram of a computing system, which in this embodiment is a server 100 suitable for use with an embodiment of the present invention. The server 100 may be used to execute application and/or system services such as a system and method for the scheduling of various operations in accordance with an embodiment of the present invention.

With reference to FIG. 1, the server 100 may comprise suitable components necessary to receive, store and execute appropriate computer instructions. The components may include a processor 102, read only memory (ROM) 104, random access memory (RAM) 106, an input/output devices such as disc drives 108, remote or connected input devices 110 (such as a mobile computing device, a smartphone or a ‘desktop’ personal computer), and one or more communications link(s) 114.

The server 100 includes instructions that may be installed in ROM 104, RAM 106 or disc drives 112 and may be executed by the processor 102. There may be provided a plurality of communication links 114 which may variously connect to one or more computing devices 110 such as servers, personal computers, terminals, wireless or handheld computing devices, or mobile communication devices such as a mobile (cellular) telephone. At least one of a plurality of communications link 114 may be connected to an external computing network through a telecommunications network.

In one particular embodiment the device may include a database 116 which may reside on the storage device 112. It will be understood that the database may reside on any suitable storage device, which may encompass solid state drives, hard disc drives, optical drives or magnetic tape drives. The database 116 may reside on a single physical storage device or may be spread across multiple storage devices.

The server 100 includes a suitable operating system 118 which may also reside on a storage device or in the ROM of the server 100. The operating system is arranged to interact with the database and with one or more computer programs to cause the server to carry out the steps, functions and/or procedures in accordance with the embodiments of the invention described herein.

Broadly, the invention relates to a computing method and system arranged to interact with one or more remote devices via a communications network. The remote devices may take the form of other computing devices, as described above, but may also take the form of electronically operated devices, such as valves, hatches, pumps, etc. as will be described in more detail later.

Other aspects of the broad inventive concept relate to a corresponding method, computer program and data signal. The method facilitates the scheduling of operations and the subsequent performance of such operations, by the use of a communications network which allows commands or data to send between one or more remote devices and one or more databases.

In order to describe the underlying algorithms and processes which operate the scheduling system, it is instructive to begin by defining some variables which represent various components within an oil refinery system. The ensuing paragraphs describe a mathematical model which underpins the software system described above. It will be understood that the ensuing mathematical model is described by reference to mathematical equations in order to provide the skilled addressee with the best mode for the embodiment. While abstract mathematical concepts are described in order to fully describe the inventive concept, the broader inventive concept is not an “abstract idea” but is reduced to practice by being encoded in a software application which operates on a computing system, which in turn operates a semi-automated or fully automated oil refinery. Therefore, the ensuing description is to be read in the context of a physical system.

Returning to the system, it is firstly helpful to define an operation decision as OD=(COT, S, D, V_((S, D)), INT=[τ_(s), τ_(e)]), where COT denotes the oil type to be processed; S the device where the oil comes from; D the device where the oil goes to; V_((S, D)) the amount of oil to be processed; and INT the time duration of the OD with τ_(s) and τ_(e) being the start and end time, respectively.

The device the oil comes from, S, maybe a tanker, a storage tank, a pipeline, and a charging tank, while the device the oil goes to, D, can be a storage tank, a pipeline, a charging tank, and a distiller.

In addition, to allow for a complex system with multiple components, K denotes the set of tanks, K_(i) denotes Tank i, and Cap(K_(i)) and V(K_(i)) the capacity of K_(i) and oil volume in K_(i), respectively. Further, SK and CK denote the sets of storage and charging tanks, respectively, and DT the set of distillers.

For the purposes of the system (which is generally true in a real world situation in any event), the oil flow rate for an OD is scheduled to be a constant in practice and is determined as f=V_((S, D))/(τ_(e)−τ_(s))

For crude oil operations, there are three types of operational decisions (ODs)

1. crude oil unloading from a tanker (S) to a storage tank (D), denoted ODU

2. crude oil delivering from a storage tank (S) to a charging tank (D) by using a pipeline, denoted ODT and

3. crude oil feeding from a charging tank (S) to a distiller (D) denoted ODF.

Respectively, the time durations for ODU, ODT, and ODF are denoted as [τ_(us), τ_(ue)], [τ_(ts), τ_(te)], and [τ_(fs), τ_(fe)]. The flow rates for the three ODs are denoted as f_(ODU)=V_(ODU)/(τ_(ue)−τ_(us)), f_(ODT)=f_(pm)=V_((i, j))/(τ_(te)−τ_(ts)), and f_(ODF)=V_(j,k))/(τ_(fe)−τ_(fs)), respectively, where V_(ODU) is the oil volume for an ODU, f_(pm) is the flow rate of a pipeline and V_((i, j)) is the oil volume transported from Storage Tank i to Charging Tank j for an ODT, and V_((j, k)) is the oil volume fed into Distiller k from Charging Tank j.

Based on the definitions above and given a scheduling horizon

=[τ_(start), τ_(end)] with τ_(start) and τ_(end) being the start and end time, and initial state information, the short-term scheduling problem is to determine an ordered set of ODs {ODU₁, ODU₂, . . . , ODU_(x), ODT₁, ODT₂, . . . , OTU_(y); ODF₁, ODF₂, . . . , ODF_(z)} such that all constraints are satisfied and a majority of objectives are optimized.

The initial state information specifies tanker arrival information including arrival time and oil types and volume being carried, oil inventory in storage and charging tanks, and in pipelines and operation state of devices.

As above discussed, a short-term schedule is an ordered set of ODs and the process of a refinery is continuous. In the context of the broader inventive concept and the system described herein, an OD is a control command and its execution transfers the system state from one to another (e.g. opens a valve, closes a valve, etc).

Assume that, for a given scheduling horizon

₁=[τ₀, τ₁], the initial state is Z₀ and a short-term schedule is found and is denoted as SCH₁ such that all constraints are satisfied during

₁. By executing SCH₁, state Z₁ is reached. Then, by starting from Z₁, one needs to schedule the system for

₂=[τ₁, τ₂] with τ₂>τ₁. However, a schedule SCH₂ that satisfies all constraints for

₂ may not be physically (or mathematically) possible. In this case, Z₁ is referred to as an unsafe state.

A state Z_(i) at time τ_(i) can be considered safe, if, by starting from Z_(i) at τ_(i), a feasible schedule can be found for

=[τ_(i), ∞]. Then, a schedule SCH, starting from Z_(i−1) is said to be feasible if after SCH, is executed state Z_(i) is reached such that Z_(i) is safe. With this concept of schedule feasibility, less restrict schedulability conditions can be developed.

Using the variables and nomenclature, along with the framework discussed above for studying the scheduling problem, a model is built to describe the hybrid system behavior using a Petri Net, an example of which is shown in FIG. 2.

The Petri net (PN) model developed is obtained by extending the resource-oriented Petri nets (ROPN). It is a colored-timed PN (CTPN) defined as CTPN=(P=P_(D) ∪ P_(C), T=T_(D) ∪ T_(T) ∪ T_(C), I, O, ϕ, M₀) where P_(D) and P_(C) denote sets of discrete and continuous places; T_(D), T_(T) and T_(C) denote sets of discrete, timed, and continuous transitions; I and O present the input and output relations between places and transitions; ϕ is a set of colors representing different oil types with ϕ(p) and ϕ(t) being color sets of P and T respectively; M₀ gives the initial state (marking) of a system. The icons used in the model are given in FIG. 3.

To describe the hybrid properties of an oil refinery, a token in discrete place is modeled as a discrete one. However, a token in a continuous place can be treated as both a discrete one and continuous one. When it is treated as a discrete one, it indicates the fact that there is crude oil in a device; while it is treated as a continuous one, it presents the amount of oil in a device, which is called token volume. A discrete or timed transition behaves just as the one in a general PN, while a continuous transition should be fired according to a given rate. Based on this idea, we now introduce the model for the system. A refinery contains different devices that are the resources for the system. According to ROPN modeling, the key is to model the resources. For crude oil operations, the resources are tanks and pipelines. Thus, we present the PN models for them first.

The PN model for a storage or charging tank is shown in FIG. 3. In the model, continuous places p_(s) and p_(c) are used to describe the state of a tank. When there is a token in p_(s), or p_(c), or both, it indicates that the tank holds some oil in it, otherwise it does not. If there is a token in p_(s), then the oil in a tank is not ready for discharging, or continuous transition t cannot fire. Continuous place p₁ is used to model the capacity of a tank available at a marking, while discrete place p₃ is used to realize the control logic for a tank.

Continuous transitions t_(f) and t are used to model the charging and discharging of a tank. With one token in p₃, only one of transitions t_(f), t_(r), and t can fire at a time such that a tank cannot be charged and discharged at the same time. Then, timed transition t_(r) and inhibitor arc (p_(s), t) together with the control logic provided by p₃ ensure that the oil residency time constraint cannot be violated. In this way, a tank is well modeled.

The PN model for a pipeline is shown in FIG. 4. Assume that the largest number of different oil segments in a pipeline is three. Then, continuous places p₁-p₃ are used to model these segments. With t₁ being a discrete transition, when the token in p₁ goes out, t₁ fires immediately such that the token in p₂ enters into p₁ and its behavior is well modeled. Transitions t_(1l)-t_(1k) are used to model oil charging into a pipeline from different storage tanks, while t_(Ol)-t_(Ok) are used to model oil charging into different charging tanks from the pipeline. Let T₁={t_(I1), t_(I2), . . . , t_(Ik)} and T_(O)={t_(Oi), t_(O2), . . . , I _(Ok)}. We pose a restriction that only one transition in T_(I) and one in T_(O) can fire with the same rate at a time such that a pipeline can feed one charging tank at a time and receives oil from one storage tank only. This model can be described by a reduced model as shown in the right side of FIG. 4, which is denoted by transition y.

Based on the PN models for devices, we can present a PN model for the whole system by describing the behavior among the devices. By ignoring the discrete place and the inhibitor arc in the PN of a tank for clarity, a PN model for a system with three storage tanks, three charging tanks, and one distiller is depicted in FIG. 5. In the model, as the macro transition of a pipeline, y is the discharging transition for every storage tank and the charging transition for every charging tank.

Hence, {t_(f(1)), t_(r(1)), y, p_(s(1)), p_(c(1)), p₁₍₁₎}, {t_(f(2)), t_(r(2)), y, p_(s(2)), p_(c(2)), p₁₍₂₎}, and {t_(f(3)), t_(r(3)), y, p_(s(3)), p_(c(3)), p₁₍₃₎} model the three storage tanks, while {y, t_(r(4)), t₍₄₎, p_(s(4)), p_(c(4)), p₁₍₄₎}, {y, t_(r(5)), t₍₅₎, p_(s(5)), p_(c(5)), p₁₍₅₎} and {y, t_(r(6)), t₍₆₎, p_(s(6)), p_(c(6)), p₁₍₆₎} model the three charging tanks, respectively. Place p₀ with K tokens in it indicates that a tanker with K types of crude oil being carried is ready to be unloaded. A token in p₁ models the process that a type of oil is being unloaded. Thus, only p₁ is empty, can t₁ fire to move a token to p₁ from p₀, which models the process that the oil in a tanker is unloaded one type by one type. Place p_(dt(1)) represents a distiller. With the input transitions of p_(dt(1)) being continuous and t_(dt(1)) being immediately discrete one, at any time, the amount of oil that flows into p_(dt(1)) must be equal to the one that flows out it. In this way, the material flow in the system is structurally described.

It should be pointed out that only one of the output transitions of p₁ and one of the input transitions of p_(dt(1)) can fire at a time. Also, y can serve for one storage tank and one charging tank at a time. All continuous transitions should be governed by ODs. Thus, based on the structure shown in FIG. 5, to describe the dynamic behavior of the system, we need to define the transition enabling and firing rules.

Let ^(•)t and ^(•)p denote the presets of t and p, and t^(•) and p^(•) the postsets of t and p, respectively. Further, let M(p) ∈

={0, 1, 2, . . . } be the number of tokens in p at marking M, φ, be the color of crude oil type i and M(p, φ_(i)) the number of tokens with color φ_(i), p ∈ P_(c), and V(M(p)) ∈

⁺ and V(M(p, φ_(i))) ∈

⁺ with

⁺ being the set of non-negative real numbers, p ∈ P_(c), the amount of oil in p and the amount of oil type i in p at marking M, respectively. Notice that if M(p)=0, then V(M(p) )=0 must hold. Similarly, M(p, φ_(i))=0 implies that V(M(p, φ_(i)))=0. With the above symbols, the readers can refer to [Wu et at., 2008b and 2009] for the transition enabling and firing rules for the PN model. Based on the PN model, we discuss how to schedule the crude oil operations with less charging tanks next.

If there are three charging tanks available for each distiller in an oil refinery, a feasible schedule for crude oil operations can always be found to achieve the maximal productivity. Under such a condition, the requirements on charging tank capacity and oil volume in the charging tanks at the initial state are easy to satisfy. However, as pointed out earlier, in practice, there may not be so many charging tanks due to maintenance requirement and production capacity extension. Thus, in this situation, we need to schedule a system with less than three charging tanks for a distiller for some time. The aim of this paper is to solve such a challenging problem.

In a real world scenario, many oil refineries purchases more crude oil than the amount required just for production when oil price is lower, there is sufficient oil in the storage tanks for production. Thus, to schedule crude oil operations is mainly to make decisions on ODTs and ODFs. This work is done under the assumption that there is enough crude oil in the storage tanks to be processed. Therefore, the productivity of an oil refinery is bounded by the maximal flow rate of the pipeline. With productivity being a critical objective, the scheduling problem is discussed for the achievement of maximal productivity. We develop our approach under different system configurations next.

for a system with one distiller, if there are two charging tanks, there is no feasible schedule. It is also shown that, with three charging tanks for a two-distiller system, a feasible schedule cannot be found. However, the non-existence of feasible schedule for a one-distiller system with two charging tanks does not implies that a feasible schedule cannot be found for a two-distiller system with four charging tanks.

A feasible schedule exists for such a system. Let CK₁-CK₄ denote the four charging tanks, DT₁ and DT₂ the two distillers, and f_(dt1) and f_(dt2) the flow rates of DT₁ and DT₂, respectively. The PN model for such a system is depicted in FIG. 5, where {y, t_(r(1)), t₍₁₎, p_(s(1)), p_(c(1)), p₁₍₁₎}, {y, t_(r(2)), t₍₂₎, p_(s(2)), p_(c(2)), p₁₍₂₎}, {y, t_(r(3)), t₍₃₎, p_(s(3)), p_(c(3)), p₁₍₃₎}, {y, t_(r(4)), t₍₄₎, p_(s(4)), p_(c(4)), p₁₍₄₎} and p_(dt1) and p_(dt2) are for the four charging tanks and two distillers, respectively. Let Ω denote the oil residency time in a tank, V(CK_(i), φ_(k)) the volume of oil with color φ_(k) in tank CK_(i), and V₀(CK_(j), φ_(k)) the initial crude oil volume with color φ_(k) in tank CK_(j).

Further let

$\begin{matrix} \left\{ \begin{matrix} {{V_{0}\left( {{CK}_{1},\phi_{1}} \right)} = {{{f_{{dt}\; 1}/\left( {f_{{dt}\; 1} + f_{{dt}\; 2}} \right)} \times \varpi} + \mu_{1}}} \\ {{V_{0}\left( {{CK}_{2},\phi_{1}} \right)} = 0} \\ {{V_{0}\left( {{CK}_{3},\phi_{2}} \right)} = \mu_{2}} \\ {{V_{0}\left( {{CK}_{4},\phi_{2}} \right)} = {{f_{{dt}\; 2}/f_{{dt}\; 1}} \times \varpi}} \end{matrix} \right. & (1) \end{matrix}$

where ω ∈ [max{f_(dt1)/f_(dt2)×μ, μ}, min{Cap₁, Cap₂, f_(dt1)/f_(dt2)×Cap₃, f_(dt1)/f_(dt2)×Cap₄}].

Then, based on the PN model shown in FIG. 6, the following scheduling algorithm can be utilized by the software.

Algorithm 1: Suppose that: 1) a refinery has two distillers DT₁ and DT₂ and their flow rates are f_(dt1) and f_(dt2), respectively, and μ=Ω×(f_(dt1)+f_(dt2)), μ₁=Ω×f_(dt1), and μ₂=Ω×f_(dt2); 2) the pipeline has a maximal flow rate f_(pm)=f_(dt1)+f_(dt2); 3) four charging tanks CK₁-CK₄ are available and their capacity is Cap₁-Cap₄ with min{Cap₁, Cap₂, Cap₃, Cap₄}≥μ; 4) during the scheduling horizon, DT₁ processes oil type #1 represented by color φ₁ and DT₂ processes oil type #2 represented by color φ₂; 5) CK₁ and CK₂ are used for serving DT₁, while CK₃ and CK₄ for serving DT₂; 6) initially, CK₁ and CK₃ with oil volume V₀(CK₁, φ₁) and V₀(CK₃, φ₂) in them are feeding DT₁ and DT₂ respectively; CK₄ with oil volume V₀(CK₄, φ₂) in it has just been charged; and CK₂ is empty and ready for charging. Then, the system can be scheduled as follows.

1. For the pipeline, during the scheduling horizon, the following operations are sequentially performed:

-   -   1.1. The pipeline starts feeding CK₂ with volume ω of oil type         #1 and flow rate f_(pm), and then go to Step 1.2.     -   1.2. The pipeline starts feeding CK₃ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and then         go to Step 1.3.     -   1.3. The pipeline starts feeding CK₁ with volume ω of oil type         #1 and flow rate f_(pm), and then go to Step 1.4.     -   1.4. The pipeline starts feeding CK₄ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         Step 1.1.

2. For DT₁, during the scheduling horizon, the following operations are sequentially performed:

-   -   2.1. CK₁ is used to feed DT₁ until it is empty, and then go to         Step 2.2.     -   2.2. CK₂ is used to feed DT₁ until it is empty, and then go to         Step 2.1.

3. For DT₂, during the scheduling horizon, the following operations are sequentially performed:

-   -   3.1. CK₃ is used to feed DT₂ until it is empty, and go to Step         3.2.     -   3.2. CK₄ is used to feed DT₂ until it is empty, and go to Step         3.1.

The feasibility of the schedule obtained by Algorithm 1 is shown by reference to the proof below.

With the PN model shown in FIG. 6, the system can be scheduled as follows.

1. Assume that the initial time is τ₀ with initial marking M₀ for the PN model. Then, at M₀, we have M₀ (p_(c(1)))=M₀(p_(c(3)))=M₀(p_(s(4)))=1. From (1), ω−V₀(CK, φ₁)=f_(dt2)/(f_(dt1)+f_(dt2))×ω−μ₁≥0 holds, i.e., the initial crude oil volume in CK₁ is less than ω: Hence, V(M₀(p_(c(1))), φ₁)=V₀(CK₁, φ₁)=f_(dt1)/(f_(dt1)+f_(dt2))×ω+μ₁≤ω ₁ V(M₀(p_(c(3))), φ₂)=V₀(CK₃,φ₂)=μ₂, V(M₀(p_(s(4))), φ₂)=V₀(CK₄, φ₂)=f_(dt2)/f_(dt1)×ω. At this marking, transition y starts its firing for feeding CK₂ with volume ω of oil type #1 and flow rate f_(pm); and CK₁ and CK₃ are feeding DT₁ and DT₂ by the firing of t₍₁₎ and t₍₃₎, respectively.

2. At time τ₁=τ₀+Ω, the oil in CK₃ is used up and the PN is transferred to M₁. At this marking, we have M₁(p_(c(3)))=0, or V(M₁(p_(c(3))), φ₂)=0; M₁(p_(c(4)))=1 and V(M₁(p_(c(4))), φ₂)=V₀(CK₄, φ₂)=f_(dt2)/f_(dt1)×ω, implying that the oil in CK₄ is ready for feeding; CK₁ is feeding DT₁ with volume V(M₁(p_(c(1)), φ₁)=f_(dt1)/f_(dt1)+f_(dt2))×ω of oil being remained and CK₄ starts to feed DT₂ by firing t₍₄₎; and CK₂ is being fed by the firing of y with volume V(M₁(p_(s(2))), φ₁)=μ of oil being charged into it.

3. At time τ₂=τ₀+ω/f_(pm), the charging process of CK₂ has just been completed and the PN is transferred to M₂. At this marking, we have V(M₂(p_(s(2))), φ₁)=ω; CK₁ is feeding DT₁ with V(M₂(p_(c(1))), φ₁)=μ₁ of oil left; CK₃ is empty and starts to be fed by firing y with volume f_(dt2)/f_(dt1)×ω of oil; and CK₄ is feeding DT₂ with V(M₂(p_(c(4))), φ₂)=f_(dt2)×f_(dt2)×ω/f_(dt1)/f_(pm)+Ω×f_(dt2) of oil being left.

4. At time τ₃=τ₂+Ω, CK₁ is emptied and the PN is transferred into M₃. At this marking, we have M₃(p_(s(1)))=M₃(p_(c(1)))=0; the oil in CK₂ is ready for feeding and starts to feed DT₁ with volume ω of oil in it; CK₃ is still being charged by the firing of y; and CK₄ is feeding DT₂ with volume V(M₃(p_(c(4))), φ₂)=f_(dt2)/f_(dt1)×ω−ω/(f_(dt1)+f_(dt2))×f_(dt2) of oil left.

5. At time τ₄=τ²+f_(dt2)×ω/f_(dt1)/(f_(dt1)+f_(dt2)), the charging of CK₃ is completed and CK₁ starts to be charged by firing y with volume ω and flow rate f_(pm). At this marking, CK₂ is feeding DT₁ with V(M₄(p_(c(2))), φ₁)=f_(dt1)×ω/f_(pm)+Ω×f_(dt1) of oil left; V(M₄(p_(s(3 ))), φ₂)=f_(dt2)/f_(dt1)×ω; and CK₄ is feeding DT₂ with V(M₄(p_(c(4))), φ₂)=Ω×f_(dt2) of oil left.

As M₄ and M₀ are equivalent, this process can continue such that the system can operate uninterruptedly, i.e., a feasible schedule is found to realize the required refining process.

By Algorithm 1, with two charging tanks for a distiller, a feasible schedule can be found. In scheduling a refinery, it is desired that the number of charging tank switches in distiller feeding is as small as possible, which requires that a charging tank be charged with much oil as possible. In practice, the capacity of a charging tank is much greater than μ. Also, with ω being given above, the tank can be charged to capacity. Thus, the obtained schedule is practically applicable. Let

$\begin{matrix} \left\{ \begin{matrix} {{V_{0}\left( {{CK}_{1},\phi_{1}} \right)} = \varpi} \\ {{V_{0}\left( {{CK}_{2},\phi_{1}} \right)} = 0} \\ {{V_{0}\left( {{CK}_{3},\phi_{2}} \right)} = {{f_{{dt}\; 2}/\left( {f_{{dt}\; 1} + f_{{dt}\; 2}} \right)} \times \varpi}} \\ {{V_{0}\left( {{CK}_{4},\phi_{2}} \right)} = {{f_{{dt}\; 2}/f_{{dt}\; 1}} \times \varpi}} \end{matrix} \right. & (2) \end{matrix}$

where ω ∈ [max{f_(dt1)/f_(dt2)×μ, μ}, min{Cap₁, Cap₂, f_(dt1)/f_(dt2)×Cap₃, f_(dt1)/f_(dt2)×Cap₄}]. Then, based on the PN model shown in FIG. 6, the following scheduling algorithm (2) is utilised.

Algorithm 2: Suppose that: 1) a refinery has two distillers DT₁ and DT₂ with flow rates f_(dt1), and f_(dt2), and μ=Ω×(f_(dt1)+f_(dt2)), μ₁=Ω×f_(dt1), and μ₂=Ω×f_(dt2); 2) the pipeline has a maximal flow rate f_(pm)=f_(dt1)+f_(dt2); 3) four charging tanks CK₁-CK₄ are available and their capacity is Cap₁-Cap₄ with min{Cap₁, Cap₂, Cap₃, Cap₄}≥μ; 4) during the scheduling horizon, DT₁ processes oil type #1 represented by color φ₁ and DT₂ processes oil type #2 represented by color φ₂; 5) CK₁ and CK₂ are used for serving DT₁, while CK₃ and CK₄ for DT₂; 6) initially, CK₁ and CK₃ with volume V₀(CK₁, φ₁) and V₀(CK₃, φ₂) of oil in them are feeding DT₁ and DT₂ respectively; CK₄ with volume V₀(CK₄, φ₂) of oil in it has just been charged; and CK₂ is empty and ready for charging. Then, the system can be scheduled as follows.

1. For the pipeline, during the scheduling horizon, the following operations are sequentially performed:

-   -   1.1. The pipeline starts feeding CK₂ with volume ω of oil type         #1 and flow rate f_(pm), and go to Step 1.2.     -   1.2. The pipeline starts feeding CK₃ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         Step 1.3.     -   1.3. The pipeline starts feeding CK₁ with volume ω of oil type         #1 and flow rate f_(pm), and go to Step 1.4.     -   1.4. The pipeline starts feeding CK₄ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         Step 1.1.

2. For DT₁, during the scheduling horizon, the following operations are sequentially performed:

-   -   2.1. At the beginning, CK₁ is used to feed DT₁ until it is         empty, and go to Step 2.2.     -   2.2. CK₂ is used to feed DT₁ until it is empty, and go to Step         2.1.

3. For DT₂, during the scheduling horizon, the following operations are sequentially performed:

-   -   3.1. At the beginning, CK₃ is used to feed DT₂ until it is         empty, and go to Step 3.2.     -   3.2. CK₄ is used to feed DT₂ until it is empty, and go to Step         3.1.

The feasibility of the schedule obtained by Algorithm 2 is ensured by the following proof below.

With the PN model shown in FIG. 6, the system can be scheduled as follows.

1. Assume that the initial time is τ₀ with M₀ being the initial marking for the PN. Then, at M₀, we have M₀(p_(c(1)))=M₀(p_(c(3)))=M₀(p_(s(4)))=1, M₀(p_(s(2)))=M₀(p_(c(2)))=0, V(M₀(p_(c(1))), φ₁)=V₀(CK₁, φ₁)=ω, V(M₀(p_(c(3))), φ₂)=V₀(CK₃, φ₂)=f_(dt2)/(f_(dt1)+f_(dt2))×ω, and V(M₀(p_(s(4)), φ₂)=V₀(CK₄, φ₂)=f_(dt2)/f_(dt1)×ω. At this marking, transition y starts its firing for charging CK₂ with volume ω of oil type #1 and flow rate f_(pm); and CK₁ and CK₃ are feeding DT₁ and DT₂ by the firing of t₍₁₎ and t₍₃₎, respectively.

2. At time τ₁=τ₀+Ω, the oil in CK₄ is ready for feeding and the PN is transferred to M₁. At this marking, we have V(M₁(p_(c(4))), φ₂)=V₀(CK₄, φ₂)=f_(dt2)/f_(dt1)×ω; CK₁ is feeding DT₁ with volume V(M₁(p_(c(1))), φ₁)=ω−μ₁ of oil being remained, while CK₃ is feeding DT₂ with V(M₂(p_(c(3))), φ₂)=f_(dt2)/f_(pm)×ω−μ₂ of oil being remained, and CK₂ is being charged by the firing of y with volume V(M₁(p_(s(2))), φ₁)=μ of oil being charged into it.

3. At time τ₂=τ₀+ω/f_(pm), the charging process of CK₂ has just been completed and the PN is transferred to M₂. At this marking, we have V(M₂(p_(s(2))), φ₁)=ω; CK₁ is feeding DT₁ with (V(M₂(p_(c(1))), φ₁)=ω−ω/(f_(dt1)+f_(dt2))×f_(dt1)=ω×f_(dt2)/f_(pm) of oil left; CK₃ is emptied and starts to be charged by firing y with volume f_(dt2)/f_(dt1)×ω of oil; and CK₄ starts to feed DT₂ with V(M₂(p_(c(4))), φ₂)=f_(dt2)/f_(dt1)×ω in it.

4. At time τ₃=τ₂+Ω, the oil in CK₂ is ready for feeding with volume ω of oil in it and the PN is transferred into M₃. At this marking, we have V(M₃(p_(c(2))), φ₁)=ω; CK₁ is feeding DT₁ with volume V(M₃(p_(c(1))), φ₁)=f_(dt2)/f_(pm)×ω−μ₁ of oil being remained; CK₃ is still being charged by the firing of y; CK₄ is feeding DT₂ with volume V(M₃(p_(c(4))), φ₂)=f_(dt2)/f_(dt1)×ω−μ₂ of oil left.

5. At time τ₄=τ₂ f_(dt2)×ω/f_(dt1)/f_(pm), CK₁ is emptied and starts to be charged by firing y with volume ω and flow rate f_(pm). The PN is transferred into M₄. At this marking, we have V(M₄(p_(c(1))), φ₁)=0; CK₂ starts to feed DT₁ with V(M₄(p_(c(2))), φ₁)=ω; the charging of CK₃ is completed; and CK₄ is feeding DT₂ with V(M₄(p_(c(4))), φ₂)=f_(dt2)/f_(pm)×ω of oil left.

As M₄ and M₀ are equivalent, this process can continue such that the system can operate uninterruptedly, i.e., a feasible schedule is found to realize the required refining process.

As shown with reference to Algorithm 2, the obtained schedule based on Algorithm 2 is the same as the schedule obtained by Algorithm 1. The only difference is that each algorithm begins from a different set of initial states.

Note that the initial states in Algorithms 1 and 2 are given as conditions. Thus, the two algorithms allow for the creation of feasible schedules despite starting from different initial states. This property eases the finding of a feasible schedule. The following algorithm further relaxes the required initial conditions. Let

$\quad\left\{ \begin{matrix} {{{{f_{{dt}\; 1}/\left( {f_{{dt}\; 1} + f_{{dt}\; 2}} \right)} \times \varpi} + \mu_{1}} \leq {V_{0}\left( {{CK}_{1},\phi_{1}} \right)} \leq \varpi} \\ {{V_{0}\left( {{CK}_{2},\phi_{1}} \right)} = 0} \\ {\mu_{2} \leq {V_{0}\left( {{CK}_{3},\phi_{2}} \right)} \leq {{f_{{dt}\; 2}/\left( {f_{{dt}\; 1} + f_{{dt}\; 2}} \right)} \times \varpi}} \\ {{V_{0}\left( {{CK}_{4},\phi_{2}} \right)} = {{f_{{dt}\; 2}/f_{{dt}\; 1}} \times \varpi}} \end{matrix} \right.$

where ω ∈ [max{f_(dt1)/f_(dt2)×μ,μ}, min{Cap₁, Cap₂, f_(dt1)/f_(dt2)×Cap₃, f_(dt1)/f_(dt2)×Cap₄}]. Then, based on the PN model shown in FIG. 6, another scheduling algorithm is provided.

Algorithm 3: Suppose that: 1) a refinery has two distillers DT₁ and DT₂ with flow rates f_(dt1) and f_(dt2), respectively, and μ=Ω×(f_(dt1)+f_(dt2)), μ₁=Ω×f_(dt1), and μ₂=Ω×f_(dt2); 2) the pipeline has a maximal flow rate f_(pm)=f_(dt1)+f_(dt2); 3) four charging tanks CK₁-CK₄ are available and their capacity is Cap₁-Cap₄ with min{Cap₁, Cap₂, Cap₃, Cap₄}≥μ; 4) during the scheduling horizon, DT₁ processes oil type #1 represented by color φ₁ and DT₂ processes oil type #2 represented by color φ₂; 5) CK₁ and CK₂ are used for serving DT₁, while CK₃ and CK₄ for serving DT₂; 6) initially, CK₁ and CK₃ with volume V₀(CK₁, φ₁) and V₀(CK₃, φ₂) of oil in them are feeding DT₁ and DT₂ respectively; CK₄ with volume V₀(CK₄, φ₁) of oil in it has just been charged; and CK₂ is empty and ready for charging. Then, the system can be scheduled as follows.

1. For the pipeline, during the scheduling horizon, the following operations are sequentially performed:

-   -   1.1. The pipeline starts feeding CK₂ with volume ω of oil type         #1 and flow rate f_(pm), and go to Step 1.2.     -   1.2. The pipeline starts feeding CK₃ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         Step 1.3.     -   1.3. The pipeline starts feeding CK₁ with volume ω of oil type         #1 and flow rate f_(pm), and go to Step 1.4.     -   1.4. The pipeline starts feeding CK₄ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         Step 1.1.

2. For DT₁, during the scheduling horizon, the following operations are sequentially performed:

-   -   2.1. CK₁ is used to feed DT₁ until it is empty, and go to Step         2.2.     -   2.2. CK₂ is used to feed DT₁ until it is empty, and go to Step         2.1.

3. For DT₂, during the scheduling horizon, the following operations are sequentially performed:

-   -   3.1. At the beginning, CK₃ is used to feed DT₂ until it is         empty, and go to Step 3.2.     -   3.2. CK₄ is used to feed DT₂ until it is empty, and go to Step         3.1.

The feasibility of the schedule obtained by Algorithm 3 is ensured by the feasibility of schedules obtained by Algorithms 1 and 2. Therefore, the schedule obtained by Algorithm 3 is feasible.

Note that, for the initial states in Algorithms 1-3, V₀(CK₁, φ₁)+V₀(CK₂, φ₁)=f_(dt1)/(f_(dt1)+f_(dt2))×ω+μ₁and V₀(CK₃, φ₂)+V₀(CK₄, φ₂)=μ₂+f_(dt2)/f_(dt1)×ω in Algorithm 1 are the lower bound of V₀(CK₁, φ₁)+V₀(CK₂, φ₁) and V₀(CK₃, φ₂)+V₀(CK₄, φ₂) in Algorithm 3, respectively, while V₀(CK₁, φ₁)+V₀(CK₂, φ₁)=ω and V₀(CK₃, φ₂)+V₀(CK₄, φ₂)=f_(dt2)/(f_(dt1)−f_(dt2))×ω+f_(dt2)/(f_(dt1)×ω in Algorithm 2 are the upper bound of V₀(CK₁, φ₁)+V₀(CK₂, φ₁) and V₀(CK₃, φ₂)+V₀(CK₄, φ₂) in Algorithm 3, respectively.

Hence, according to Algorithm 3, for any initial state between the ones given in Theorems 1 and 2, a feasible schedule exists and can be found. In other words, Algorithm 3 states that, to find a feasible schedule with two charging tanks per distiller, the amount of oil initially in the charging tanks can be a range, not just a point as given in Algorithms 1 and 2. This implies that the initial conditions do not impose a strict restriction in scheduling a system.

Furthermore, it follows from the schedule given in Algorithm 3 that the scheduling method is same as that in Algorithms 1 and 2. Thus, for any acceptable initial state, a feasible schedule can be found.

Based on the results for the two-distiller case, a more general case with more than two distillers may be derived. That is, a general case with k>2 distillers. Using similar nomenclature to the previous algorithms, p_(dtδ), {y, t_(r(2δ−1)), t(_(2δ−1)), p_(s(2δ−1)), p_(c(2δ−1)), p_(1(2δ−1))} and {y, t_(r(2δ)), t_((2δ)), p_(s(2δ)), p_(c(2δ)), p_(1(2δ))} represent distiller DT_(δ), charging tanks CK_(2δ−1), and CK_(2δ) for feeding DT_(δ), respectively, to form a PN model for such a system as shown in FIG. 7.

Let A=max {f_(dt1)/f_(dtδ)×μ|δ∈

_(k)={1, 2, . . . , k}} and B=min{Cap₁, Cap₂, f_(dt1)/f_(dt2)×Cap₃, f_(dt1)/f_(dt2)×Cap₄, . . . , f_(dt1)/f_(dtk)×Cap_(2k−1), f_(dt1)/f_(dtk)×Cap_(2k)}. Further let

                                           (4) $\left\{ \begin{matrix} {{{V_{0}\left( {{CK}_{1},\phi_{1}} \right)} = 0},{{V_{0}\left( {{CK}_{2},\phi_{1}} \right)} = {\mu_{1} + {\varpi \times {f_{{dt}\; 1}/f_{pm}}}}}} \\ {{{V_{0}\left( {{CK}_{3},\phi_{2}} \right)} = 0},{{V_{0}\left( {{CK}_{4},\phi_{2}} \right)} = {\mu_{2} + {\frac{\left( {\varpi \times f_{{dt}\; 2}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times \left( {f_{{dt}\; 1} + f_{{dt}\; 2}} \right)}}}} \\ \ldots \\ {{{V_{0}\left( {{CK}_{{2\delta} - 1},\phi_{\delta}} \right)} = 0},{{V_{0}\left( {{CK}_{2\delta},\phi_{\delta}} \right)} = {\mu_{\delta} + {\frac{\left( {\varpi \times f_{{dt}\; \delta}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times {\sum\limits_{i = 1}^{\delta}\; f_{dti}}}}}} \\ \ldots \\ {{{V_{0}\begin{pmatrix} {{CK}_{{2{({k - 1})}} - 1},} \\ \phi_{k - 1} \end{pmatrix}} = 0},{{V_{0}\begin{pmatrix} {{CK}_{2{({k - 1})}},} \\ \phi_{k - 1} \end{pmatrix}} = {\mu_{k - 1} + {\frac{\left( {\varpi \times f_{{dt}{({k - 1})}}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times {\sum\limits_{i = 1}^{k - 1}\; f_{dti}}}}}} \\ {{{V_{0}\left( {{CK}_{{2\; k} - 1},\phi_{k}} \right)} = {\varpi \times {f_{dtk}/f_{{dt}\; 1}}}},{{V_{0}\left( {{CK}_{2\; k},\phi_{k}} \right)} = \mu_{k}}} \end{matrix} \right.$

where ω ∈ [A, B]. Then, based on the PN model shown in FIG. 7, the following scheduling algorithm is derived.

Algorithm 4: Suppose that: 1) a refinery has k (>2) distillers DT₁-DT_(k) with flow rates f_(dt1)−f_(dtk), and μ=Ω×(f_(dt1)+f_(dt2)+f_(dtk)), μ₁=Ω×f_(dt1), μ₂=Ω×f_(dt2), . . . , μ_(k)=Ω×f_(dtk), and f_(dtmin)=min {f_(dtδ)μδ ∈

_(k)}; 2) the pipeline has a maximal flow rate f_(pm)=f_(dt1)+f_(dt2)+ . . . +f_(dtk); 3) 2k charging tanks CK₁-CK_(2k) are available and their capacity is Cap₁-Cap_(2k); 4) CK_(2δ−1) and CK_(2δ) are used for feeding DT_(δ) with Cap_(2δ−1)≥f_(dtδ)/f_(dtmin)×μ and Cap_(2δ)≥f_(dtδ)/f_(dtmin)×μ, δ ∈

_(k); 5) in the scheduling horizon, k types of crude oil with colors φ₁-φ_(k) are processed by DT₁-DT_(k), respectively; 6) initially, CK₁ is empty and starts to be charged by the pipeline and CK₂ with V₀(CK₂, φ₁) of oil in it is feeding DT₁; CK_(2δ−1) is empty or V₀(CK_(2δ−1), φ_(δ))=0 and CK_(2δ) with V₀(CK_(2δ), φ_(δ)) of oil in it is feeding DT_(δ), δ∈

_(k−1)\{1}; CK_(2k−1) has just finished its charging process with V₀(CK_(2k−1), φ_(k)) of oil in it and CK_(2k) with V₀(CK_(2k), φ_(k)) of oil in it is feeding DT_(k). Then, the system can be scheduled as follows.

1. For the pipeline, during the scheduling horizon, the following operations are sequentially performed:

-   -   1.1. The pipeline starts feeding CK₁ with volume ω of oil type         #1 and flow rate f_(pm), and go to the next step.     -   1.2. The pipeline starts feeding CK₃ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         the next step.     -   1.(k−1). The pipeline starts feeding CK_(2(k−1)−1) with volume         f_(dt(k−1))/f_(dt1)×ω of oil type #(k−1) and flow rate f_(pm),         and go to the next step.     -   1.k. The pipeline starts feeding CK_(2k) with volume         f_(dtk)/f_(dt1)×ω oil type #k and flow     -   1.(k+1). The pipeline starts feeding CK₂ with volume ω of oil         type #1 and flow rate f_(pm), and go to the next step.     -   1.(k+2). The pipeline starts feeding CK₄ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         the next step.     -   1.(2k−1). The pipeline starts feeding CK_(2(k−1)) with volume         f_(dt(k−1))/f_(dt1)×ω of oil type #(k−1) and flow rate f_(pm),         and go to the next step.     -   1.2k. The pipeline starts feeding CK_(2k−1) with volume         f_(dtk)/f_(dt1)×ω of oil type #k and flow rate f_(pm), and go to         Step 1.1.

2. For DT_(δ), δ ∈

_(k), during the scheduling horizon, the following operations are sequentially performed:

-   -   2.1. At the beginning, CK_(2δ) is used to feed DT_(δ) until it         is empty, and go to Step 2.2.     -   2.2. CK_(2δ−1) is used to feed DT_(δ) until it is empty, and go         to Step 2.1.

Therefore, the schedule obtained by Algorithm 4 is feasible.

Algorithm 4 is the extension of Algorithm 1 and demonstrates that a feasible schedule can be found for crude oil operations for a system with more than two distillers and two charging tanks per distiller if the volume of oil in the charging tanks at the initial state is given by equation (4).

The following algorithm shows that a feasible schedule can be also found for different initial states. Let

                                           (5) $\left\{ \begin{matrix} {{{V_{0}\left( {{CK}_{1},\phi_{1}} \right)} = 0},{{V_{0}\left( {{CK}_{2},\phi_{1}} \right)} = \varpi}} \\ {{{V_{0}\left( {{CK}_{3},\phi_{2}} \right)} = {\varpi \times {f_{{dt}\; 2}/f_{{dt}\; 1}}}},{{V_{0}\left( {{CK}_{4},\phi_{2}} \right)} = {\left( {\varpi \times f_{{dt}\; 2}} \right)/f_{pm}}}} \\ \ldots \\ {{{V_{0}\left( {{CK}_{{2\delta} - 1},\phi_{\delta}} \right)} = {\varpi \times {f_{{dt}\; \delta}/f_{{dt}\; 1}}}},{{V_{0}\left( {{CK}_{2\delta},\phi_{\delta}} \right)} = {\frac{\left( {\varpi \times f_{{dt}\; \delta}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times {\sum\limits_{i = 1}^{\delta - 1}\; f_{dti}}}}} \\ \ldots \\ {{{V_{0}\begin{pmatrix} {{CK}_{{2{({k - 1})}} - 1},} \\ \phi_{k - 1} \end{pmatrix}} = \frac{\varpi \times f_{{dt}{({k - 1})}}}{f_{{dt}\; 1}}},{{V_{0}\begin{pmatrix} {{CK}_{2{({k - 1})}},} \\ \phi_{k - 1} \end{pmatrix}} = {\frac{\left( {\varpi \times f_{{dt}{({k - 1})}}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times {\sum\limits_{i = 1}^{k - 2}\; f_{dti}}}}} \\ {{{V_{0}\left( {{CK}_{{2\; k} - 1},\phi_{k}} \right)} = {\varpi \times {f_{dtk}/f_{{dt}\; 1}}}},{{V_{0}\left( {{CK}_{2\; k},\phi_{k}} \right)} = {\frac{\left( {\varpi \times f_{dtk}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times {\sum\limits_{i = 1}^{k - 1}\; f_{dti}}}}} \end{matrix} \right.$

where ω ∈ [A, B]. Then, based on the PN model shown in FIG. 7, the following scheduling algorithm is derived.

Algorithm 5: Suppose that: 1) a refinery has k (>2) distillers DT₁-DT_(k) with flow rates f_(dt1)−f_(dtk), and μ=Ω×(f_(dt1)+f_(dt2)+ . . . +f_(dtk)), μ₁=Ω×f_(dt1), Ω×f_(dt2), . . . , μ_(k)=Ω×f_(dtk), and f_(dtmin)=min{f_(dtδ)}, δ ∈

_(k); 2) the pipeline has a maximal flow rate f_(pm)=f_(dt1)+f_(dt2)+ . . . +f_(dtk); 3) 2k charging tanks CK₁-CK_(2k) are available and their capacity is Cap₁-Cap_(2k); 4) CK_(2δ−1) and CK_(2δ) are used for feeding DT_(δ) with Cap_(2δ−1)≥f_(dtδ)/f_(dtmin)×μ and Cap_(2δ)≥f_(dtδ)/f_(dtmin)×μ, δ ∈

_(k); 5) in the scheduling horizon, k types of crude oil with colors φ₁-φ_(k) are processed by DT₁-DT_(k), respectively; 6) initially, CK₁is empty and starts to be charged by the pipeline and CK₂ with V₀(CK₂, φ₁) of oil in it is feeding DT₁; CK_(2δ) with V₀(CK_(2δ), φ_(δ)) of oil in it is feeding DT_(δ), δ∈

_(k−1)\{1}, and CK_(2δ−1) with V₀(CK_(2δ−1), φ_(δ)) of oil in it is ready for feeding; CK_(2k−1) has just finished its charging process with V₀(CK_(2k−1), φ_(k)) of oil in it and CK_(2k) with V₀(CK_(2k), φ_(k)) of oil in it is feeding DT_(k). Then, the system can be scheduled as follows.

1. For the pipeline, during the scheduling horizon, the following operations are sequentially performed:

-   -   1.1. The pipeline starts feeding CK₁ with volume ω of oil type         #1 and flow rate f_(pm), and go to the next step.     -   1.2. The pipeline starts feeding CK₄ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         the next step.     -   1.3. The pipeline starts feeding CK₆ with volume         f_(dt3)/f_(dt1)×ω of oil type #3 and flow rate f_(pm), and go to         the next step.     -   1.k. The pipeline starts feeding CK_(2k) with volume         f_(dtk)/f_(dt1)×ω of oil type #k and flow rate f_(pm), and go to         the next step.     -   1.(k+1). The pipeline starts feeding CK₂ with volume ω of oil         type #1 and flow rate f_(pm), and go to the next step.     -   1.(k+2). The pipeline starts feeding CK₃ with volume         f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm), and go to         the next step.     -   1.(k+3). The pipeline starts feeding CK₅ with volume         f_(dt3)/f_(dt1)×ω of oil type #3 and flow rate f_(pm), and go to         the next step.     -   1.(2k−1). The pipeline starts feeding CK_(2(k−1)−1) with volume         f_(dt(k−1))/f_(dt1)×ω of oil type #(k−1) and flow rate f_(pm),         and go to the next step.     -   1.2k. The pipeline starts feeding CK_(2k−1) with volume         f_(dtk)/f_(dt1)×ω of oil type #k and flow rate f_(pm), and go to         Step 1.1.

2. For DT_(δ), δ ∈

_(k), during the scheduling horizon, the following operations are sequentially performed:

-   -   2.1. At the beginning, CK_(2δ) is used to feed DT_(δ) until it         is empty, and go to Step 2.2.     -   2.2. CK_(2δ−1) is used to feed DT_(δ) until it is empty, and go         to Step 2.1.

The schedule obtained by Algorithm 5 is feasible.

Based on Algorithm 5, the obtained schedule is similar to that based on Algorithm 4 except that they start from different initial states. Algorithm 5 is the extension of Algorithm 2. Let L_(δ)=μ_(δ)+(ω×f_(dtδ))/(f_(pm)×f_(dt1))×Σ_(i=1) ^(δ)ƒ_(dti), H_(δ)=(ω×f_(dtδ))/f_(dt1)+(ω×f_(dtδ))/(f_(pm)×f_(dt1))×Σ_(i=1) ^(δ−1)ƒ_(dti), and G_(δ)=(ω×f_(dtδ)/(f_(pm)×f_(dt1))×Σ_(i=1) ^(δ−1)ƒ_(dti), respectively. Then, based on Algorithms 4 and 5, just like Algorithm 3, the following algorithm further relaxes the required initial conditions. Let

                                           (6) $\left\{ \begin{matrix} {{{V_{0}\left( {{CK}_{1},\phi_{1}} \right)} = 0},{{\mu_{1} + {\varpi \times {d_{{dt}\; 1}/f_{pm}}}} \leq {V_{0}\left( {{CK}_{2},\phi_{1}} \right)} \leq \varpi}} \\ {{\delta \in {N_{k - 1}\backslash \left\{ 1 \right\}}},} \\ {\begin{pmatrix} {L_{\delta} \leq {{V_{0}\left( {{CK}_{{2\delta} - 1},\phi_{\delta}} \right)} +}} \\ {{V_{0}\left( {{CK}_{2\delta},\phi_{\delta}} \right)} \leq H_{\delta}} \end{pmatrix}\bigwedge\begin{pmatrix} {\left( {{V_{0}\left( {{CK}_{2\delta},\phi_{\delta}} \right)} \leq G_{\delta}} \right)\bigvee} \\ \left( {{V_{0}\left( {{CK}_{{2\delta} - 1},\phi_{\delta}} \right)} = 0} \right) \end{pmatrix}} \\ {{{V_{0}\left( {{CK}_{{2\; k} - 1},\phi_{k}} \right)} = \frac{\varpi \times f_{dtk}}{f_{{dt}\; 1}}},{\mu_{k} \leq \left( {{CK}_{2\; k},\phi_{k}} \right) \leq {\frac{\left( {\varpi \times f_{dtk}} \right)}{\left( {f_{pm} \times f_{{dt}\; 1}} \right)} \times {\sum\limits_{i = 1}^{k - 1}\; f_{dti}}}}} \end{matrix} \right.$

where ω ∈ [A, B]. Then, based on the PN model shown in FIG. 5, we present the following scheduling algorithm.

Algorithm 6: Suppose that: 1) a refinery has k (>2) distillers DT₁-DT_(k) with flow rates f_(dt1)−f_(dtk), and μ=Ω×(f_(dt1)+f_(dt2)+ . . . +f_(dtk)), μ₁=Ω×f_(dt1), μ₂=Ω×f_(dt2), . . . , μ_(k)=Ω×f_(dtk), and f_(dtmin)=min{f_(dtδ)}, δ ∈

_(k); 2) the pipeline has a maximal flow rate f_(pm)=f_(dt1)+f_(dt2)+ . . . +f_(dtk); 2k charging tanks CK₁-CK_(2k) are available and their capacity is Cap₁-Cap_(2k); 4) CK_(2δ−1) and CK_(2δ) are used for feeding DT_(δ) with Cap_(2δ−1)≥f_(dtδ)/f_(dtmin)×μ and Cap_(2δ)≥f_(dtδ)/f_(dtmin)×μ, δ ∈

_(k); 5) in the scheduling horizon, k types of crude oil with colors φ₁-φ_(k) are processed by DT₁-DT_(k), respectively; 6) initially, CK₁ is empty and starts to be charged by the pipeline; and CK₂ with V₀(CK₂, φ₁) is feeding DT₁; CK_(2δ) with V₀(CK_(2δ), φ_(δ)) of oil in it is feeding DT_(δ), and there is V₀(CK_(2δ−1), φ_(δ)) of oil in CK_(2δ−1), δ∈

_(k−1)\{1}; CK_(2k−1) has just finished its charging process with V₀(CK_(2k−1), φ_(k)) of oil and CK_(2k) with V₀(CK_(2k), φ_(k)) of oil in it is feeding DT_(k). Then, the system can be scheduled as follows.

1. For the pipeline, during the scheduling horizon, the following operations are sequentially performed:

-   -   1.1. The pipeline starts feeding CK₁ with volume ω of oil type         #1 and flow rate f_(pm), and go to the next step.     -   1.2. If V₀(CK₃, φ₂)=0, the pipeline starts feeding CK₃ with         volume f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm),         and go to the next step; otherwise, the pipeline starts feeding         CK₄ with volume f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate         f_(pm), and go to the next step.     -   1.3. If V₀(CK₅, φ₃)=0, the pipeline starts feeding CK₅ with         volume f_(dt3)/f_(dt1)×ω of oil type #3 and flow rate f_(pm),         and go to the next step; otherwise, the pipeline starts feeding         CK₆ with volume f_(dt3)/f_(dt1)×ω of oil type #3 and flow rate         f_(pm), and go to the next step.     -   1.(k−1). If V₀(CK_(2(k−1)−1), φ_(k−1))=0, the pipeline starts         feeding CK_(2(k−1)−1) with volume f_(dt(k−1))/f_(dt1)×ω of oil         type #(k−1) and flow rate f_(pm), and go to the next step;         otherwise, the pipeline starts feeding CK_(2(k−1)) with volume         f_(dt(k−1))/f_(dt1)×ω of oil type #(k−1) and flow rate f_(pm),         and go to the next step.     -   1.k. The pipeline starts feeding CK_(2k) with volume         f_(dtk)/f_(dt1)×ω of oil type #k and flow rate f_(pm), and go to         the next step.     -   1.(k+1). The pipeline starts feeding CK₂ with volume ω of oil         type #1 and flow rate f_(pm), and go to the next step.     -   1.(k+2). If V₀(CK₃, φ₂)=0, the pipeline starts feeding CK₄ with         volume f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate f_(pm),         and go to the next step; otherwise, the pipeline starts feeding         CK₃ with volume f_(dt2)/f_(dt1)×ω of oil type #2 and flow rate         f_(pm), and go to the next step.     -   1.(k+3). If V₀(CK₅, φ₃)=0, the pipeline starts feeding CK₆ with         volume f_(dt3)/f_(dt1)×ω of oil type #3 and flow rate f_(pm),         and go to the next step; otherwise, the pipeline starts feeding         CK₅ with volume f_(dt3)/f_(dt1)×ω of oil type #3 and flow rate         f_(pm), and go to the next step.     -   1.(2k−1). If V₀(CK_(2(k−1)−1), φ_(k−1))=0, the pipeline starts         feeding CK_(2(k−1)) with volume f_(dt(k−1))/f_(dt1)×ω of oil         type #(k−1) and flow rate f_(pm), and go to the next step;         otherwise, the pipeline starts feeding CK_(2(k−1)−1) with volume         f_(dt(k−1))/f_(dt1)×ω of oil type #(k−1) and flow rate f_(pm),         and go to the next step.     -   1.2k. The pipeline starts feeding CK_(2k−1) with volume         f_(dtk)/f_(dt1)×ω of oil type #k and flow rate f_(pm), and go to         Step 1.1.

2. For DT_(δ), δ ∈

_(k), during the scheduling horizon, the following operations are sequentially performed:

-   -   2.1. At the beginning, CK_(2δ) is used to feed DT_(δ) until it         is empty, and go to Step 2.2.     -   2.2. CK_(2δ−1) is used to feed DT_(δ) until it is empty, and go         to Step 2.1.

The schedule obtained by Algorithm 6 is feasible.

Algorithm 6 is the extension of Algorithm 3. In summary, for a refinery with two or more distillers, if there are two charging tanks for a distiller, a feasible schedule can be found to achieve the maximal productivity. It can be easily shown that, with less charging tanks than the required number here, no feasible schedule can be found, due to the oil residency time constraints and the uninterrupted operation requirement for a distiller. Thus, by the obtained results, we present the least number of charging tanks for a distiller to find a maximal-productivity feasible schedule. This is a significant advancement in this research field.

By the presented scheduling method, it requires that initially the oil in the charging tanks should be in a given range. In practice, at the beginning of a scheduling horizon, there must be oil in the charging tanks, otherwise no feasible schedule can be found even though there are sufficient charging tanks. Thus, the conditions for the lower bound requirements can be always satisfied. When the oil in some charging tanks exceeds the upper bound, we can control the pipeline to be idle for some time such that the initial state to be the given range. Furthermore, in practice, often a refinery operates under a state such that the productivity is little lower than the maximal flow rate of the pipeline. In this case, there is more flexibility for realizing the proposed scheduling method. Hence, the initial state requirements do not hinder the application of the proposed method in practice.

One of the requirements in the proposed scheduling method is that, during the entire scheduling horizon, each distiller processes one type of crude oil only. This requirement is made to ease the presentation of the proposed results. In fact, whenever a charging tank is charged, another type of oil can be charged into it such that a distiller is switched to process another type of oil. The problem is that, by the proposed method for the case with two charging tanks for a distiller, every time CK_(i) is charged for feeding DT_(i), it is charged with the same volume, say ω_(i). However, in some cases, after ξ<ω_(i) of oil type d is processed by DT_(i), it should process oil type h, which cannot be realized by the proposed method due to the insufficiency of charging tanks. Note that the goal of this work is to present the least number of charging tanks for scheduling the system and it is successfully done. In practice, often there are more charging tanks than the required one for the proposed method. In fact, if there is one more charging tank in the system, the above scheduling requirement can be realized based on the proposed method.

Note that, by the proposed method, a detailed schedule can be easily obtained without involving complex computation. Thus, based on the proposed method, given a realizable refining schedule, a detailed schedule can be efficiently obtained.

To demonstrate the application of the proposed method, the abovementioned algorithms were utilized in a real world industrial scenario, namely a refinery in China. In the refinery, there are three distillers DT₁-DT₃ and a schedule is presented every 10 days (i.e. there is a ten-day scheduling horizon).

Based on a production plan and market demands, the refinery is required to meet the refining schedule shown in FIG. 8. For this refining schedule, the oil feeding rates are f_(dt1)=323 tons/h, f_(dt2)=302 tons/h, and f_(dt3)=625 tons/h, respectively. The maximal flow rate of the pipeline is f_(pm)=1250 tons/h such that we have f_(pm)=f_(dt1)+f_(dt2)+f_(dt3). The oil residency time for a tank is 6 hours, or Ω=6 h.

TABLE 1 The oil types and their volumes initially in the charging tanks Capacity Type of oil Volume Tank (Ton) filled (Ton) CK₁ 16000 Oil #8 16000 CK₂ 16000 Oil #1 8000 CK₃ 16000 Oil #1 16000 CK₄ 16000 Oil #6 5000 CK₅ 16000 CK₆ 16000 Oil #6 16000 CK₇ 30000 Oil #3 30000 CK₈ 30000 Oil #2 16000 CK₉ 30000 CK₁₀ 16000

There are 10 charging tanks in the refinery and the oil types and volumes initially in the charging tanks are shown in Table 1. There is 12,000 tons of oil type #4 in the pipeline. In an initial state, CK₂, CK₆, and CK₇ are feeding DT₁, DT₂, and DT₃, respectively. Also, it is planned that after the oil in CK₄ is used up, maintenance should be performed for CK₄. Also, it is known that there is enough oil of type #1, #7, and #4 in the storage tanks.

It follows from the above initial state and the given refining schedule that the oil in charging tanks CK₁ and CK₈ is not processed during the scheduling horizon. Furthermore, CK₄ is planned to be maintained. Thus, during the scheduling horizon, only seven charging tanks are usable, i.e., the condition that it needs three charging tanks for a distiller is not satisfied. Then, the proposed method is used to schedule the system.

Based on the proposed method, charging tanks are assigned to serve for different distiller and determine the oil volume to be charged when a charging tank is charged. With DT₁, DT₂, and DT₃ being initially fed by CK₂, CK₆, and CK₇, respectively, and the oil in the charging tanks, CK₂ and CK₃ are assigned to DT₁, CK₄, CK₅, and CK₆ are assigned to DT₂, and CK₇ and CK₉ are assigned to DT₃. Note that, since CK₄ should be maintained, only two charging tanks are assigned to DT₂. With the aforementioned charging tank assignment, CK₁₀ is used to serve for an oil type switch when necessary.

Then, using Theorem 6 to schedule the system, A=max {f_(dt1)/f_(dtδ)×μ|δ∈

₃}=8021.52 tons and B=min{Cap₂, Cap₃, f_(dt1)/f_(dt2)×Cap₅, f_(dt1)/f_(dt2)×Cap₆, f_(dt1)/f_(dt3)×Cap₇, f_(dt1)/f_(dt3)×Cap₉}=15504 tons. To reduce the number of switches in feeding distillers, we let ω=B=15504 tons. It can be verified that the oil initially in the charging tanks satisfies Condition 6. Then, according to the proposed method, to schedule the system, one needs to alternately use CK₂ and CK₃ to feed DT₁, CK₆ and CK₄, and then CK₅ and CK₆ to feed DT₂, and CK₇ and CK₉ to feed DT₃.

Also, at the same time, when CK₂ or CK₃ is charged, it is charged with V₁=ω=15504 tons of oil; when CK₅ or CK₆ is charged, it is charged with V₂=ω=f_(dt2)/f_(dt1)=14,496 tons of oil; and when CK₇ or CK₉ is charged, it is charged with V₃=ω×f_(dt3)/f_(dt1)=30,000 tons of oil. Note that, using such a schedule, CK₇ and CK₉ can be charged to capacity, while the others can be charged to more than 90% of capacity.

During the scheduling, it is necessary to determine whether the required volume of oil can be switched from one oil type to another. In this case, after processing 45,000 tons of oil type #1, the system needs to process oil type #5. Thus, according to the scheduling method, when CK₃ is charged for the first time, we can charge 5496 tons of oil type #1, which is less than V₁=15504. To solve this problem, after charging 5496 tons of oil type #1 into CK₃, 10,008 tons of oil type #5 is charged into CK₁₀. By taking this step, a feasible schedule with maximal productivity is determined. The relevant Gantt charts are shown in FIGS. 9 and 10. The Gantt chart in FIG. 9 presents the detailed distiller feeding schedule for each distiller, while the chart in FIG. 10 gives the detailed schedule for delivering oil to the charging tanks.

In the known art, it is extremely difficult or even impossible to obtain a detailed short-term schedule for such a real-life application problem. Utilising the algorithms described above, when encoded in software, a detailed feasible schedule can be easily found to realize a given refining schedule. This may be implemented as a system, which in turn controls electronically controlled components of an oil refinery system.

Conventional techniques require three charging tanks for feeding a distiller, which cannot always be satisfied in real-life cases, especially when some charging tanks are undergoing maintenance and/or the production capacity of the refinery is extended. To cope with this problem, the algorithms encoded into the system described herein relax this restriction, where feasible.

By using a hybrid Petri net model encoded into software, a feasible schedule can be found if there are two charging tanks for a distiller in a computationally efficient manner. This provides a significant advancement in the ability of refineries to schedule production, tank filling and many other aspects of their operation. Moreover, the system does not require any user intervention, as the calculation is automatic and does not rely on specific user input or decision making.

Throughout this specification, unless the context requires otherwise, the word “comprise” or variations such as “comprises” or “comprising”, will be understood to imply the inclusion of a stated integer or group of integers but not the exclusion of any other integer or group of integers.

Those skilled in the art will appreciate that the invention described herein is susceptible to variations and modifications other than those specifically described. The invention includes all such variation and modifications. The invention also includes all of the steps, features, formulations and compounds referred to or indicated in the specification, individually or collectively and any and all combinations or any two or more of the steps or features.

Definitions for selected terms used herein may be found within the detailed description of the specification and apply throughout. Unless otherwise defined, all other scientific and technical terms used herein have the same meaning as commonly understood to one of ordinary skill in the art to which the invention belongs.

Although not required, the embodiments described with reference to the method, computer program, data signal and aspects of the system can be implemented via an application programming interface (API), an application development kit (ADK) or as a series of program libraries, for use by a developer, for the creation of software applications which are to be used on any one or more computing platforms or devices, such as a terminal or personal computer operating system or a portable computing device, such as a smartphone or a tablet computing system operating system, or within a larger server structure, such as a ‘data farm’ or within a larger transaction processing system.

Generally, as program modules include routines, programs, objects, components and data files that perform or assist in the performance of particular functions, it will be understood that the functionality of the software application may be distributed across a number of routines, programs, objects or components to achieve the same functionality as the embodiment and the broader invention claimed herein. Such variations and modifications are within the purview of those skilled in the art.

It will also be appreciated that where methods and systems of the present invention and/or embodiments are implemented by computing systems or partly implemented by computing systems then any appropriate computing system architecture may be utilised. This includes standalone computers, network computers and dedicated computing devices (such as field-programmable gate arrays).

Where the terms “computer”, “computing system” and “computing device” are used in the specification, these terms are intended to cover any appropriate arrangement of computer hardware for implementing the inventive concept and/or embodiments described herein.

Where the terms “scheduling system”, “autonomous device” and “smart device” are used in the specification, these terms are intended to cover any appropriate device which is capable of receiving a command and utilising the command to perform a function, which may be either a “physical” function (i.e. movement) or a “virtual” function (e.g. interact with another device via electronic commands).

Where reference is made to cloud computing, the term refers to Internet-based computing, wherein shared resources, software, and/or information are provided to one or more computing devices on-demand via the Internet (or other communications network).

Where reference is made to communication standards, methods and/or systems/devices may transmit and receive data via a variety of forms: 3G, 4G (CDMA/GSM), Wi-Fi, Bluetooth, other radio frequency, optical, acoustic, magnetic, GPS/GPRS, or any other form or method of communication that may become available from time to time. 

1. A system for scheduling at least one event, comprising a component module arranged to receive component data regarding a plurality of possible operation decisions, a modelling module arranged to utilise the plurality of operation decisions to construct a Petri net model to simulate a real world system, and a scheduling module arranged to utilise the Petri net and variable data regarding the plurality of operation decisions to determine a schedule of events that is feasible subject to a set of predetermined constraints, and an operation module arranged to provide the schedule of events to at least one external device.
 2. The system of claim 1, wherein the schedule of events is optimised via use of an optimisation algorithm.
 3. The system of claim 1, wherein the operation decisions include a subset of variables which describe physical components and/or physical characteristics of a real world system.
 4. The system of claim 3, wherein the operation decisions are directed to the operation of an oil refinery.
 5. The system of claim 4, wherein the physical characteristics of the real world system include the oil type, the device from which oil is received, the device where oil goes and the amount of oil to be processed.
 6. The system of claim 4, wherein the physical components include a storage tank, a pipeline, a charging tank and a distiller.
 7. The system of claim 2, wherein the optimisation algorithm comprises modelling discrete physical components by providing constraints that determine how each discrete physical component operates.
 8. The system of claim 2, wherein the optimisation algorithm comprises modelling discrete physical characteristics by providing constraints that determine how each discrete physical component operates.
 9. The system of claim 2, wherein the Petri net is a hybrid discrete-continuous Petri net.
 10. A method for scheduling at least one event, comprising the steps of receiving component data regarding a plurality of possible operation decisions, utilising the plurality of operation decisions to construct a Petri net model to simulate a real world system, and utilising the Petri net and variable data regarding the plurality of operation decisions to determine a schedule of events that is feasible subject to a set of predetermined constraints.
 11. The method of claim 10, wherein the schedule of events is optimised via use of an optimisation algorithm.
 12. The method of claim 10, wherein the operation decisions include a subset of variables which describe physical components and/or physical characteristics of a real world system.
 13. The method of claim 12, wherein the operation decisions are directed to the operation of an oil refinery.
 14. The method of claim 13 wherein the physical characteristics of the real world system include the oil type, the device from which oil is received, the device where oil goes and the amount of oil to be processed.
 15. The method of claim 13, wherein the physical components include a storage tank, a pipeline, a charging tank and a distiller.
 16. The method of claim 11, wherein the optimisation algorithm comprises modelling discrete physical components by providing constraints that determine how each discrete physical component operates.
 17. The method of claim 11, wherein the optimisation algorithm comprises modelling discrete physical characteristics by providing constraints that determine how each discrete physical component operates.
 18. The method of claim 11, wherein the Petri net is a hybrid discrete-continuous petri net.
 19. A computer program incorporating at least one instruction, arranged to, when executed on a computing system, perform the method steps of claim
 10. 20. A data signal encoding at least one instruction, arranged to, when received and executed on a computing system, perform the method steps of claim
 10. 21. An oil refinery incorporating a system in accordance with claim 1, wherein the at least one device includes a physical component which operates at least one aspect of the oil refinery. 